import { ApiProperty } from '@nestjs/swagger';
import { TodoStatus } from '../entities/todo.entity';
import { IsOptional, IsNumber, IsString } from 'class-validator';

export class CreateTodoDto {
  @ApiProperty({ description: '标题' })
  @IsString()
  title: string;

  @ApiProperty({ description: '详情' })
  @IsString()
  description?: string;

  @ApiProperty({ description: '状态：1-已完成，0-未完成' })
  @IsNumber()
  status?: TodoStatus;

  @ApiProperty({ description: '媒介', required: false })
  @IsOptional()
  @IsString()
  media?: string;
}
